package main;

import jms.listener.AdvertisementListener;
import jms.sender.*;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;



public class Action {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext2.xml");
        Sender sender = context.getBean(MerchantSender.class);
        Sender sender1 = context.getBean(AdvertiseSender.class);
        Sender sender2 = context.getBean(AdvertiseStatusSender.class);
        Sender sender3 = context.getBean(ComplaintSender.class);
        for (int i=0;i<100;i++){
//            sender.send("merhcnat"+i);
//            sender1.send("advertise"+i);
//            sender2.send("advertiseStatus"+i);
//            sender3.send("complaint"+i);

        }
    }
}
